namespace study21 {
  type Easing2 = 'ease-in' | 'ease-out' | 'ease-in-out'

  const enum EasingEnum2 {
    EASE_IN = 'ease-in',
    EASE_OUT = 'ease-out',
    EASE_IN_OUT = 'ease-in-out',
  }

  type A = {
    name: string
    age: string
  };
  type B = { age: string };

  type AB = A & B

  let ABObj: AB = {
    name: 'dff',
    age: 'sss'
  }


  function name(params: A | B) {
    console.log(params.age);
    console.log((params as A).name);
    console.log((<A>params).name);

    // 不推荐
    console.log((<any>params).name);

  }


  const names1 = '小满'
  // names1 = 'aa' //无法修改


  let names2 = '小满' as const
  // names2 = 'aa' //无法修改



  const a2 = [10, 20];
  // a2 = 23 //报错
  a2[0] = 787

  let a1 = [10, 20] as const;
  // a1 = 2323  // 只读 无法重新赋值
  // a1[0] = 2323 // 只读 无法重新赋值

  let inputEl = document.querySelector('.input') as HTMLInputElement
}

export {}


